﻿using Microsoft.AspNetCore.Mvc;
using UpperComputer.Application;
using YFurion.Application;

namespace UpperComputer.Web.Entry.Controllers
{
    /// <summary>
    /// 登录日志控制器
    /// </summary>
    [ApiDescriptionSettings(ApiGroupConst.SYSTEM_LOG)]
    public class LoginInOrOutLogController : AuthorizeController
    {
        private readonly ILoginInOrOutLogService _loginInOrOutLogService;

        /// <summary>
        /// 登录日志控制器构造函数
        /// </summary>
        /// <param name="loginInOrOutLogService">登陆日志服务</param>
        public LoginInOrOutLogController(ILoginInOrOutLogService loginInOrOutLogService)
        {
            _loginInOrOutLogService = loginInOrOutLogService;
        }

        public async Task<PagedResultDto<LoginInOrOutLogDto>> Get([FromQuery] LoginInOrOutLogResultRequestDto loginInOrOutLogResultRequestDto)
        {
            PagedResultDto<LoginInOrOutLogDto> pagedResultDto = await _loginInOrOutLogService.GetAll(loginInOrOutLogResultRequestDto);
            return pagedResultDto;
        }
    }
}
